package edu.sctu.fengleilin.month05.day150521;

/**
 * Created by user09 on 2015/5/21.
 */
public class SonAddClass extends AddClass {
    int a = 0, b = 0, c = 0;

    SonAddClass(int x) {
        super(x);
        a = x + 7;
    }

    SonAddClass(int x, int y) {
        super(x, y);
        a = x + 5;
        b = y + 5;
    }

    SonAddClass(int x, int y, int z) {
        super(x, y, z);
        a = x + 4;
        b = y + 4;
        c = z + 4;
    }

    public int add() {
        System.out.println("super:x + y + z + " + super.add());
        return a + b + c;
    }
}
